import authRequest from '@/utils/authRequest';


export type LoginParamsType = {
  userName: string;
  password: string;
  mobile: string;
  captcha: string;
};

export async function fakeAccountLogin(params: LoginParamsType) {
  return authRequest('/login.do?ajax=1&mode=cors', {
    method: 'POST',
    data: params,
    requestType: 'form'
  });
}

export async function getFakeCaptcha(mobile: string) {
  return authRequest(`/api/login/captcha?mobile=${mobile}`);
}
